package cn.stimd.spring.jdbc.datasource;

import cn.stimd.spring.transaction.support.SmartTransactionObject;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public abstract class JdbcTransactionObjectSupport implements SmartTransactionObject {
    private ConnectionHolder connectionHolder;
    private Integer previousIsolationLevel;

    public void setConnectionHolder(ConnectionHolder connectionHolder) {
        this.connectionHolder = connectionHolder;
    }

    public ConnectionHolder getConnectionHolder() {
        return this.connectionHolder;
    }

    public Integer getPreviousIsolationLevel() {
        return previousIsolationLevel;
    }

    public void setPreviousIsolationLevel(Integer previousIsolationLevel) {
        this.previousIsolationLevel = previousIsolationLevel;
    }

    @Override
    public void flush() {
        // no-op
    }
}
